package com.bootdo.system.service.impl;

import com.bootdo.common.utils.R;
import com.bootdo.common.utils.ShiroUtils;
import com.bootdo.system.dao.DyMemberDao;
import com.bootdo.system.dao.UserDao;
import com.bootdo.system.domain.DyMember;
import com.bootdo.system.domain.UserDO;
import com.bootdo.system.service.DyMemberService;
import com.bootdo.system.service.WxConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @create 2021-02-28 00-55
 */
@Service
public class DyMemberServiceImpl implements DyMemberService {

    @Autowired
    private DyMemberDao member;



    @Override
    public List<DyMember> selectDyMemberList(String appId) {
        UserDO user = ShiroUtils.getUser();

        return member.selectMemberList(appId,Integer.valueOf(String.valueOf(user.getUserId())));
    }

    @Override
    public R addDyMemeber(DyMember dyMember) {
        member.addMemeber(dyMember);
        return R.ok();
    }

    @Override
    public R updateMember(DyMember dyMember) {
        member.updateMember(dyMember);
        return R.ok();
    }
}
